package com.deelete.springcloud.utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class CommonResult<T> implements Serializable {

    public static String STATUS_SUCCESS="200";

    public static String STATUS_ERROR="404";

    private String status; //状态

    private String message;//消息

    private T data;   //返回数据

    //定义一个无返回数据的构造
    public CommonResult(String status, String message){
        this(status,message,null);
    }
}
